#!/usr/bin python
# -*- coding: utf-8 -*-
# @Time    : 2024/3/8 14:00
# @Author  : hhr
import requests

request_url = "http://epub.cnipa.gov.cn/SW/SwListQuery"

headers = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Content-Length": "386",
    "Content-Type": "application/x-www-form-urlencoded",
    "Cookie": "wIlwQR28aVgbS=5zwwmrPg2Zz.ha2vH_doHRkIGUuTKKiAhjika63IJakVl7841zQKAulanz0rxrNQmjn51MGvFLrbNefrZUk1jYa; WEB=20111132; .AspNetCore.Antiforgery.VJ9V3gR6RkM=CfDJ8EBcwSz2nhtAkWCG-TSTGz3jZG0duOynN2XYeyNLHs_I9qGWDd0AKlV51kiagg54ZS_Do-mYo-pGSI1dCixxdRfcG-1ck0FKfFuy4q2XBRy2RxcIgDSxzMsabMW6T1hdJU3wQyTzUKngb2ZYsxNaffc; wIlwQR28aVgbT=a5efQ_5NKKWpryO_tA5zhdkM1IdvMTa6vNO0OVwlacNN15KgdsHkuDnAlBS_iQ4wtX5_D0MqQPDly2RH7cQWv1paylgrIQEXgvDro_GweYGWOvkOTlmEBSONMV5w7L4c_KJj2nwoYITCogqssuiVuIauRUTXCMTS63GhLVa_UOmwF..REG0LoPv_UXpHM0ch3avKhlktQwGiqZy_MTSqqxgKN019kKSyhN1GTeyfrNiplPEuHRdS8kFbR2WgqcyJHavqix_1YrEHBubZsa.IvpfWZgUAMORpGFeNjf70eerEtITRg49NZGhf_8ylw_FohFVa2dd9CTuvM45QAK743xS.k_0_WfRe2UlReJc5nBIODmddkdJH9eddAxBugkds.ZWd4dDreokBoV1ssfXqFG",
    "Host": "epub.cnipa.gov.cn",
    "Origin": "http://epub.cnipa.gov.cn",
    "Pragma": "no-cache",
    "Referer": "http://epub.cnipa.gov.cn/SW",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
}

data = {
    "sortField": "ggr_desc",
    "pageSize": "10",
    "pageNum": "1",
    "swInfo.SwType": "",
    "swInfo.PubType": "",
    "isFmsq": "true",
    "isXx": "true",
    "isWg": "true",
    "swInfo.An": "2016202053436",
    "swInfo.SwPubdate": "",
    "swInfo.SwInfo": "",
    "trsSql": "__RequestVerificationToken: CfDJ8HCqbh2XM3RPmalgOcRbn2NT0dSw9CgsV3KfPSp83t2e9NepGFXb8xP0RGBd5EHugZnC5sP4NpaUYjgHhFvmN2CFh2kj15BPq3ma5CtmtnxjX7aZ0TwOLHbuQJfEQYuMihTDgno87K6nHpdXsywZDxk",
}

reql = requests.post(request_url, headers=headers, data=data)
print(reql.text)